var mongoose = require("mongoose");

//类别表(follow)

var followSchema = new mongoose.Schema({
  userid: {
    type: mongoose.SchemaTypes.ObjectId,
    ref: "user_login",
    required: true
  }, //用户id
  followid: {
    type: mongoose.SchemaTypes.ObjectId,
    ref: "user_login",
    required: true
  }, //被关注用户id
  follow_time: {
    type: Date,
    default: new Date()
  } //关注时间
});

module.exports = mongoose.model("follow", followSchema);
